package model

type AdminMenu struct {
	Id         int64  `json:"id"`
	Pid        int64  `json:"pid"`
	SchoolId   int64  `json:"school_id"`
	Name       string `json:"name" `
	Router     string `json:"router" `
	Icon       string `json:"icon" `
	Icon1      string `json:"icon1" `
	Sort       string `json:"sort" `
	Status     string `json:"status" `
	CreateTime string `json:"create_time"`
}

func (AdminMenu) TableName() string {
	return "fd_admin_menu"
}

type AdminMenuToChild struct {
	Id     int64           `gorm:"primaryKey;autoIncrement;column:id;" json:"id"`
	Pid    int64           `json:"pid"`
	Name   string          `json:"name"`
	Router string          `json:"router"`
	Icon   string          `json:"icon"`
	Icon1  string          `json:"icon1"`
	Child  []JoinAdminMenu `json:"child" gorm:"foreignKey:pid;references:id"`
}

func (AdminMenuToChild) TableName() string {
	return "fd_admin_menu"
}

type JoinAdminMenu struct {
	Id     int64  `gorm:"primaryKey;autoIncrement;column:id;" json:"id"`
	Pid    int64  `json:"pid"`
	Name   string `json:"name"`
	Router string `json:"router"`
	Icon   string `json:"icon"`
	Icon1  string `json:"icon1"`
}

func (JoinAdminMenu) TableName() string {
	return "fd_admin_menu"
}
